var buttonVolver = [{
	ui: 'confirm',
	text: 'Volver',
	handler: function()
		{
			window.open("menu.html","_self");
		}
	},
	{
		xtype: 'spacer'
	},
	{
		ui: 'confirm',
		text: 'Crear',
		handler: function()
		{
			window.open("crearDoc2.html","_self");
		}
	}
]

var dockedItems = [{
	xtype: 'toolbar',
	title: 'Clase de documento',
	dock: 'top',
	ui: 'dark',
	items: buttonVolver
}]

var lblRef = [{
	xtype: 'fieldset',
	defaults: 
		{
			labelAlign: 'left',
			labelWidth: '30%'
		},
	items: [
	{
		xtype: 'textfield',
		label: 'Referencia',
		useClearIcon: true
	}]
}];

bSelect = new Ext.form.Select({
        label: 'Clase doc.',
		id: 'cmbClasedoc',
        name: 'cmbClasedoc',
        store: crearDocStore,
        placeHolder: 'Seleccione..',
        valueField: 'lastName',
        displayField: 'lastName',
        useClearIcon: true,
		loadingText : 'Cargando..'
    });

					 
crearDocView = Ext.extend(Ext.Panel, 
{
	fullscreen: true,
	layout: 'card',
	initComponent: function() 
	{
		this.crearDocPanel = new Ext.Panel(
        {
			layout: 'fit',
			title:'Seleccione una clase de documento..',
			frame: true,
			dockedItems: dockedItems,
			width: 750,
            labelWidth: 175,
            style:'margin:5px 5px',
            bodyStyle:'padding:10px',
            defaults: {type:'combo'},
			items: [
				{scroll: 'both',
            	type: 'fieldset',
            	defaults:
            	{
            		labelAlign: 'left',
            		labelWidth: '30%'
            	},
            	items:[bSelect,lblRef]
            }
			],
			renderTo: Ext.getBody()
		});
        
        this.items = this.crearDocPanel;
        crearDocView.superclass.initComponent.call(this);
	}
});

Ext.reg('crearDocView', crearDocView);